<?php
include('../incsession.php');

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sample page</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
<script language="javascript">
function choose_next()
{
	if(confirm("是否再看一次文章"))
	{
		document.form1.action = "paragraph2_op.php";
		document.forms["form1"].submit();
	}
	else
	{
		if(confirm("是否更改答案"))
		{
			document.form1.action = "open_question2.php";
			document.forms["form1"].submit();
		}
		else
		{
			document.form1.action = "oq_answers.php";
			document.forms["form1"].submit();
		}
	}
}
</script>
</head>

<body onLoad="TimeCountDown()">
<div id="wrapper">
	<div id="header">
		<div id="logo"></div>
		<div id="menu">
        <?php
			include("menu.php");
		?>
       
		</div>
	</div>
	<div class="clearer"></div>
	<div class="edge-top"></div>

	<div id="main">

		<div id="title">問答題<font size=4><br></font></div>
<hr/><br><br>

<!-- 內文開始 !-->
<form method = 'POST' action="video2_oq.php" name="form1">
<?php

$query = "SELECT question FROM open_question WHERE topicid=".$_SESSION['topic']." AND level=".$_SESSION['level'];
$result = mysql_query($query, $orcp_con);


$i = 1;

while($row = mysql_fetch_array($result)){

	echo $i;

	
	echo (". ".$row['question']."<br>");
	echo '<textarea name = "your_answer'.$i.'" cols = 85 rows = 4></textarea><br><br><br>';	
	$i++;
}

$i--;
echo '<input type = "hidden" value ='.$i.' name = "num">';



?>

<br>
<div class="btn_right"><input type="button" name = "next" value = "下一步" onClick="choose_next()"></div>
<!-- 內文結束 !-->

	</div>
    <div class="edge-bottom"></div>
    <div id="footer"><?php  include("footer.php"); ?></div>
</div>

<div id="txt">18:27</div>



</body>
</html>